<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>选择人员</title>
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/cms.css" />

	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/win.js"></script>
	<script type="text/javascript">
		function getSelected(){
			var rows = $("#dg").datagrid('getSelections');
			var ids = "";
	        var arrId = [];
	        for (var i=0;i<rows.length;i++){
	            arrId.push(rows[i].id);
	        }
	        ids = arrId.join(",");
	        parent.selectUsers(ids);
		}
	</script>
</head>
<body class="easyui-layout">
<div data-options="region:'center',border:false">
	<div class="dg-content">
		<table id="dg" class="easyui-datagrid" title="人员列表"
			data-options="rownumbers:true,pagination:true,
				fitColumns:true,iconCls:'icon-users',url:'<%=request.getContextPath() %>/user/list.do'">
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'nickname',width:100,align:'center'">姓名</th>
					<th data-options="field:'username',width:80,align:'center'">用户名</th>
					<th data-options="field:'stateStr',width:80,align:'center'">状态</th>
				</tr>
			</thead>
		</table>
	</div>
</div>
<div data-options="region:'south',border:false" class="fm-btn">
	<a href="javascript:getSelected()" class="easyui-linkbutton" iconCls="icon-ok">确定</a>
	<a href="javascript:parent.closeWin()" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
</div>
</body>
</html>